package com.cy.entity;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
 * @Author: cy
 * @Date: 2022/02/05/21:11
 * @Description:   kafka发送消息的事件
 */
@Data
public class Event {

    private String topic;       //主题
    private int userId;         //触发事件的userId
    private int entityType;     //事件类型
    private int entityId;       //事件id
    private int entityUserId;   //事件所属用户的id
    private Map<String, Object> data = new HashMap<>();

    public void setData(String key, Object value) {
        this.data.put(key, value);
    }


}
